//
//  HomeButtonCollectionViewCell.m
//  UI_A项目
//
//  Created by dlios on 15-1-15.
//  Copyright (c) 2015年 songCheng. All rights reserved.
//

#import "HomeButtonCollectionViewCell.h"

@implementation HomeButtonCollectionViewCell
- (void)dealloc
{
    [_titleLabel release];
    [_homeImageView release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    
    
    return self;
}
- (void)createSubView
{
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 90, 30)];
//    self.titleLabel.backgroundColor = [UIColor redColor];
    self.titleLabel.numberOfLines = 0;
    self.titleLabel.font = [UIFont systemFontOfSize:20];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.layer.cornerRadius = 10;
    
    self.titleLabel.layer.masksToBounds = YES;
    self.titleLabel.layer.borderWidth = 1;
    self.titleLabel.layer.borderColor = [UIColor blackColor].CGColor;
//    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.textColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:1.0];
    [self.contentView addSubview:self.titleLabel];
    [_titleLabel release];
    
    
}
- (void)setModel:(HomeModel *)model
{
    if (_model != model) {
        [_model release];
        _model = [model retain];
        
    }
  
    self.titleLabel.text = _model.title;
    
}



@end
